/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：GmudPayment.java <br>
 * 创建时间：2015年4月9日 下午10:21:20 <br>
 * 所属项目：GmudEX <br>
 * @author 12548
 */
package lostland.gmud.exv2.expand;

import com.tencent.mid.api.MidService;

import cn.bmob.v3.BmobObject;

/**
 * 类名：GmudPayment <br>
 * 说明：支付信息的存储
 *
 * @author 12548
 */
public class GmudPayment extends BmobObject {

	private static final long serialVersionUID = 6036848026167776386L;

	private ProtectedString paymentStatus;

	private ProtectedString money;

	/**
	 * 需要特权时联网验证支付信息。
	 */
	private ProtectedString orderID;
	private ProtectedString mid;

	private String name = "";
	private String body = "";

	private String communityUsername = "";

	public GmudPayment(String _payID, String _mid, String _money) {
		setOrderID(new ProtectedString(_payID));
		setMid(new ProtectedString(_mid));
		setMoney(new ProtectedString(_money));
		setPaymentStatus(new ProtectedString("UNKNOWN"));
	}

	public GmudPayment() {
		setPaymentStatus(new ProtectedString("UNKNOWN"));
		setOrderID(new ProtectedString(""));
		setMid(new ProtectedString(""));
		setMoney(new ProtectedString(""));
	}

	/**
	 * 验证mid是否合法
	 *
	 * @return mid长度合法则返回true。
	 */
	public boolean isMidValid() {
		return MidService.isMidValid(getMid().getValue());
	}


	/**
	 * @return paymentStatus
	 */
	public ProtectedString getPaymentStatus() {
		return paymentStatus;
	}


	/**
	 * @param paymentStatus 要设置的 paymentStatus
	 */
	public void setPaymentStatus(ProtectedString paymentStatus) {
		this.paymentStatus = paymentStatus;
	}

	/**
	 * @param paymentStatus 要设置的 paymentStatus
	 */
	public void setPaymentStatus(String paymentStatus) {
		this.paymentStatus.setValue(paymentStatus);
	}

	/**
	 * @return money
	 */
	public ProtectedString getMoney() {
		return money;
	}


	/**
	 * @param money 要设置的 money
	 */
	public void setMoney(ProtectedString money) {
		this.money = money;
	}

	/**
	 * @param money 要设置的 money
	 */
	public void setMoney(String money) {
		this.money.setValue(money);
	}


	/**
	 * @return payID
	 */
	public ProtectedString getOrderID() {
		return orderID;
	}


	/**
	 * @param payID 要设置的 payID
	 */
	public void setOrderID(ProtectedString payID) {
		orderID = payID;
	}

	/**
	 * @param payID 要设置的 payID
	 */
	public void setOrderID(String payID) {
		orderID.setValue(payID);
	}


	/**
	 * @return mid
	 */
	public ProtectedString getMid() {
		return mid;
	}


	/**
	 * @param mid 要设置的 mid
	 */
	public void setMid(ProtectedString mid) {
		this.mid = mid;
	}


	/**
	 * @return name
	 */
	public String getName() {
		return name;
	}


	/**
	 * @param name 要设置的 name
	 */
	public void setName(String name) {
		this.name = name;
	}


	/**
	 * @return body
	 */
	public String getBody() {
		return body;
	}


	/**
	 * @param body 要设置的 body
	 */
	public void setBody(String body) {
		this.body = body;
	}

	/**
	 * @param mid2
	 */
	public void setMid(String mid2) {
		mid.setValue(mid2);
	}

	/**
	 * @return communityUsername
	 */
	public String getCommunityUsername() {
		return communityUsername;
	}

	/**
	 * @param communityUsername 要设置的 communityUsername
	 */
	public void setCommunityUsername(String communityUsername) {
		this.communityUsername = communityUsername;
	}

}
